<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改成绩输入')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-test-edit" th:object="${sysStuTest}">
            <input name="stuSno" th:field="*{stuSno}" type="hidden">
            <!--<input name="stuName" th:field="*{stuName}" type="hidden">-->
            <input name="stuPhone" th:field="*{stuPhone}" type="hidden">
            <input name="stuClass" th:field="*{stuClass}" type="hidden">
            <input name="groupInterviewId" th:unless="${admin == 1}" th:field="*{groupInterviewId}" type="hidden">
            <input name="stuC" th:unless="${admin == 1}" th:field="*{stuC}" type="hidden">
            <input name="stuEnglish" th:unless="${admin == 1}" th:field="*{stuEnglish}" type="hidden">
            <input name="stuMath" th:unless="${admin == 1}" th:field="*{stuMath}" type="hidden">
            <input name="computerTest" th:unless="${admin == 1}" th:field="*{computerTest}" type="hidden">
            <input name="meetTest" th:unless="${admin == 1}" th:field="*{meetTest}" type="hidden">
            <!--<input name="computerTest1" th:unless="${computer == 1}" th:field="*{computerTest1}" type="hidden">-->
            <!--<input name="computerTest2" th:unless="${computer == 2}" th:field="*{computerTest1}" type="hidden">-->
            <!--<input name="computerTest3" th:unless="${computer == 3}" th:field="*{computerTest3}" type="hidden">-->
            <!--<input name="computerTest4" th:unless="${computer == 4}" th:field="*{computerTest4}" type="hidden">-->
            <!--<input name="computerTest5" th:unless="${computer == 5}" th:field="*{computerTest5}" type="hidden">-->
            <!--<input name="meetTest1" th:unless="${interview == 1}" th:field="*{meetTest1}" type="hidden">-->
            <!--<input name="meetTest2" th:unless="${interview == 2}" th:field="*{meetTest2}" type="hidden">-->
            <!--<input name="meetTest3" th:unless="${interview == 3}" th:field="*{meetTest3}" type="hidden">-->

            <div class="form-group">
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input name="stuName" th:field="*{stuName}" class="form-control" type="text" required disabled>
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1}">
                <label class="col-sm-3 control-label">面试分组：</label>
                <div class="col-sm-8">
                    <select name="groupInterviewId" class="form-control m-b" th:with="type=${@dict.getType('sys_interv_group')}" >
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{groupInterviewId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1}">
                <label class="col-sm-3 control-label" >C语言：</label>
                <div class="col-sm-8">
                    <input name="stuC" th:field="*{stuC}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1}">
                <label class="col-sm-3 control-label">大学英语：</label>
                <div class="col-sm-8">
                    <input name="stuEnglish" th:field="*{stuEnglish}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1}">
                <label class="col-sm-3 control-label">高等数学：</label>
                <div class="col-sm-8">
                    <input name="stuMath" th:field="*{stuMath}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1}">
                <label class="col-sm-3 control-label">机试成绩：</label>
                <div class="col-sm-8">
                    <input name="computerTest" th:field="*{computerTest}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1}">
                <label class="col-sm-3 control-label">面试成绩：</label>
                <div class="col-sm-8">
                    <input name="meetTest" th:field="*{meetTest}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || computer == 1}">
                <label class="col-sm-3 control-label">机试成绩一：</label>
                <div class="col-sm-8">
                    <input name="computerTest1" th:field="*{computerTest1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || computer == 2}">
                <label class="col-sm-3 control-label">机试成绩二：</label>
                <div class="col-sm-8">
                    <input name="computerTest2" th:field="*{computerTest2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || computer == 3}">
                <label class="col-sm-3 control-label">机试成绩三：</label>
                <div class="col-sm-8">
                    <input name="computerTest3" th:field="*{computerTest3}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || computer == 4}">
                <label class="col-sm-3 control-label">机试成绩四：</label>
                <div class="col-sm-8">
                    <input name="computerTest4" th:field="*{computerTest4}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || computer == 5}">
                <label class="col-sm-3 control-label">机试成绩五：</label>
                <div class="col-sm-8">
                    <input name="computerTest5" th:field="*{computerTest5}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || interview == 1}">
                <label class="col-sm-3 control-label">面试成绩一：</label>
                <div class="col-sm-8">
                    <input name="meetTest1" th:field="*{meetTest1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || interview == 2}">
                <label class="col-sm-3 control-label">面试成绩二：</label>
                <div class="col-sm-8">
                    <input name="meetTest2" th:field="*{meetTest2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" th:if="${admin == 1 || interview == 3}">
                <label class="col-sm-3 control-label">面试成绩三：</label>
                <div class="col-sm-8">
                    <input name="meetTest3" th:field="*{meetTest3}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/test";
        $("#form-test-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-test-edit').serialize());
            }
        }
    </script>
</body>
</html>